import 'package:flutter_enjoy_plus/constants/index.dart';
import 'package:flutter_enjoy_plus/utils/RequestDio.dart';

//获取验证码
Future<dynamic> sendCodeAPI(params) =>
    requestDio.get(HTTP_PATH.SEND_CODE, params: params);

//登陆
Future<dynamic> loginAPI(data) => requestDio.post(HTTP_PATH.LOGIN, data: data);

//获取用户信息
Future<dynamic> getUserInfoAPI() => requestDio.get(HTTP_PATH.USER_INFO);

//更新用户信息
Future updateUserInfoAPI(data) =>
    requestDio.put(HTTP_PATH.USER_INFO, data: data);

//上传图片
Future<dynamic> uploadAPI(data) =>
    requestDio.upload(HTTP_PATH.UPLOAD, data: data);
